package weibo4j.examples.comment;

import weibo4j.Comments;
import weibo4j.examples.oauth2.Log;
import weibo4j.model.Comment;
import weibo4j.model.WeiboException;
import weibo4j.util.WeiboConfig;

public class CreateComment {

	public static void main(String[] args) {
		String access_token = WeiboConfig.getValue( "access_token" );
		String comments ="评论微博测试";
		
		String id = "3538367239555474";
		Comments cm = new Comments();
		cm.client.setToken(access_token);
		try {
			Comment comment = cm.createComment(comments, id);
			Log.logInfo(comment.toString());
		} catch (WeiboException e) {
			e.printStackTrace();
		}
		
//		Timeline t = new Timeline();
//		t.client.setToken(access_token);
//		try {
//			Status st = t.UpdateStatus( comments );
//			Log.logInfo( st.toString() );
//		} catch (WeiboException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		
	}

}
